import { Component, OnInit, Input } from "@angular/core";

@Component({
  selector: "app-prompt-map",
  templateUrl: "./prompt-map.component.html",
  styleUrls: ["./prompt-map.component.scss"]
})
export class PromptMapComponent implements OnInit {
  @Input() tagData: any;
  cssStr: any = {};
  constructor() {}

  ngOnInit() {
    const cssStyles = this.tagData.data.cssStyle.split(",");
    for (let i = 0; i < cssStyles.length; i++) {
      const cssStrs = cssStyles[i].split(":");
      this.cssStr[cssStrs[0]] = cssStrs[1];
    }
  }
}
